package org.ainlolcat.ainscience.entity;

import org.jdom.Element;

import java.io.IOException;
import java.util.Hashtable;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: ain
 * Date: 12/6/11
 * Time: 2:13 AM
 * To change this template use File | Settings | File Templates.
 */
public interface EntityParser {

    /**
     * loadTemplates from _project_ definition
     * @param desc
     * @return
     * @throws IOException
     */
    public Entity load(Element desc) throws IOException;

    /**
     * update entity with new data
     * @param entity to update
     * @throws UnsupportedEntityTypeException
     */
    public void update(Entity entity) throws UnsupportedEntityTypeException;
    
    /**
     * save to _project_ definition
     * @param e
     * @return
     */
    public Element save(Entity e) throws UnsupportedEntityTypeException;
}
